// 显示一张图片
//This example shows a simple "Hello world!" on a VGA screen.
//You need to connect a VGA screen cable to the pins specified below.
//cc by-sa 4.0 license
//bitluni

#include <ESP32Lib.h>
#include "sprites.h"

//pin configuration
const int redPin = 14;
const int greenPin = 19;
const int bluePin = 27;
const int hsyncPin = 32;
const int vsyncPin = 33;

//VGA Device
VGA3Bit vga;

void setup() {
  Serial.begin(115200);

  Mode myMode = vga.MODE640x480.custom(312, 235);
  //print the parameters
  myMode.print<HardwareSerial>(Serial);
  //initializing vga at the specified pins
  vga.init(myMode, redPin, greenPin, bluePin, hsyncPin, vsyncPin);
  sprites.draw(vga, 0, vga.xres / 2, vga.yres / 2);  //显示图片,draw(vga,索引,x坐标,y坐标),坐标应该是图片的中心点的坐标
}

void loop() {
}